#ifndef TBOX_MAIN_EXAMPLE_YOUR_H_20250610
#define TBOX_MAIN_EXAMPLE_YOUR_H_20250610

#include <tbox/main/main.h>
#include "ros_bridge.h"

namespace your {

class App : public tbox::main::Module,
            public RosBridge::Parent {
  public:
    App(tbox::main::Context &ctx);
    ~App();

  public: //! RosBridge 的上报
    virtual void on_Ros_ready() override;
    virtual void on_Ros_gotBool(bool value) override;
    virtual void on_Ros_addTwoInts(int a, int b, std::promise<int> &result) override;

  protected:
    virtual bool onInit(const tbox::Json &cfg) override;
    virtual bool onStart() override;
    virtual void onStop() override;
    virtual void onCleanup() override;

    void initShell();

  private:
    RosBridge *ros_;

    tbox::event::TimerEvent *timer_event_ = nullptr;
    int count_ = 0;
};

}

#endif //TBOX_MAIN_EXAMPLE_YOUR_H_20250610
